package com.echat.business.book.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 平台公告栏
 * </p>
 *
 * @author chentl123
 * @since 2019-06-06
 */
@TableName("echo_global_announcement")
public class Announcement extends Model<Announcement> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;
    /**
     * 公告内容
     */
    private String content;
    /**
     * 公告生成时间
     */
    private Date createTime;
    /**
     * 发布人
     */
    private Integer createby;
    /**
     * 公告类型 | 1 公告 2 新闻 3 活动 4 书讯 5 故事
     */
    private Integer type;

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Integer getCreateby() {
        return createby;
    }

    public void setCreateby(Integer createby) {
        this.createby = createby;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Announcement{" +
                ", id=" + id +
                ", content=" + content +
                ", createTime=" + createTime +
                ", createby=" + createby +
                "}";
    }
}
